import { Component, Injector, ViewChild, ViewEncapsulation } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { appModuleAnimation } from '@shared/animations/routerTransition';
import { MessageService } from '@abp/message/message.service';
import { AppComponentBase } from '@shared/common/app-component-base';
import { FlowapplyordinarycreateComponent } from '../flowapplyordinarycreate/flowapplyordinarycreate.component';
import { FlowapplyCrucialCreateComponent } from '../flowapplyCrucialCreate/flowapplyCrucialCreate.component';
import { OrderOutsourcedProcessingCreateComponent } from '../OrderOutsourcedProcessingCreate/OrderOutsourcedProcessingCreate.component';
import { OrderCrucialProcessingCreateComponent } from '../OrderCrucialProcessingCreate/OrderCrucialProcessingCreate.component';
import { ProcessingDeliveryCreateComponent } from '../ProcessingDeliveryCreate/ProcessingDeliveryCreate.component';
import { OutsourcingApplyChangeCreateComponent } from '../OutsourcingApplyChangeCreate/OutsourcingApplyChangeCreate.component';
import { CrucialOutsourcingApplyChangeCreateComponent } from '../CrucialOutsourcingApplyChangeCreate/CrucialOutsourcingApplyChangeCreate.component';
import { CrucialProcessingContentApplyChangeCreateComponent } from '../CrucialProcessingContentApplyChangeCreate/CrucialProcessingContentApplyChangeCreate.component';
import { ProcessingContentApplyChangeCreateComponent } from '../ProcessingContentApplyChangeCreate/ProcessingContentApplyChangeCreate.component';
import { HttpClient } from '@angular/common/http';
import { isMoment } from 'moment';
import { from } from 'rxjs';

@Component({
  selector: 'app-FlowInitProcess',
  templateUrl: './FlowInitProcess.component.html',
  styleUrls: ['./FlowInitProcess.component.css']
})
export class FlowInitProcessComponent extends AppComponentBase {

  @ViewChild('flowapplyCrucialCreate') flowapplyCrucialCreate: FlowapplyCrucialCreateComponent;
  @ViewChild('createFlowapplyordinary') createFlowapplyordinary: FlowapplyordinarycreateComponent;
  @ViewChild('crderOutsourcedProcessingCreate') crderOutsourcedProcessingCreate: OrderOutsourcedProcessingCreateComponent;
  @ViewChild('OrderCrucialProcessingCreate') OrderCrucialProcessingCreate: OrderCrucialProcessingCreateComponent;
  @ViewChild('ProcessingDeliveryCreate') ProcessingDeliveryCreate: ProcessingDeliveryCreateComponent;
  @ViewChild('OutsourcingApplyChangeCreate') OutsourcingApplyChangeCreate: OutsourcingApplyChangeCreateComponent;
  @ViewChild('CrucialOutsourcingApplyChangeCreate') CrucialOutsourcingApplyChangeCreate: CrucialOutsourcingApplyChangeCreateComponent;
  @ViewChild('ProcessingContentApplyChangeCreate') ProcessingContentApplyChangeCreate: ProcessingContentApplyChangeCreateComponent;
  @ViewChild('CrucialProcessingContentApplyChangeCreate') CrucialProcessingContentApplyChangeCreate: CrucialProcessingContentApplyChangeCreateComponent;

  constructor(injector: Injector,
    private _activatedRoute: ActivatedRoute,
    private _messageService: MessageService,
    private _httpClient: HttpClient) {
    super(injector);
  }

  createOrdinaryTaskOutSouring(): void {

    //this.createordinarytaskoutsouring.show();
    this.createFlowapplyordinary.show();

  }

  createCrucialTaskOutSouring(): void {

    this.flowapplyCrucialCreate.show();
  }

  createOrderOutsourcedProcessing(): void {
    //this.save('3333');
    this.crderOutsourcedProcessingCreate.show();
  }
  createOrderOutsourcedProcessingDelivery(): void {
    this.ProcessingDeliveryCreate.show();
  }
  createCrucialProcessing(): void {
    this.OrderCrucialProcessingCreate.show();
  }
  createOutsourcingApplyChangeCreate(): void {
    this.OutsourcingApplyChangeCreate.show();
  }
  createCrucialOutsourcingApplyChange(): void {
    this.CrucialOutsourcingApplyChangeCreate.show();
  }
  createProcessingContentApplyChange(): void {
    this.ProcessingContentApplyChangeCreate.show();
  }
  createCrucialProcessingContentApplyChange(): void {
    this.CrucialProcessingContentApplyChangeCreate.show();
  }
  save(severity: string) {
    this._messageService.success('You have successfully registered. Waiting for activation!');
    //this.messageService.add({ severity: severity, summary: 'Success', detail: 'Data Saved' });
  }
}
